<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		
	</head>
	<body>
		<h1>你好,欢迎访问贵美商城！</h1>
		<div id="myclock">
		</div>
		<script>
			
			function disptime(){
				var today=new Date();
				var nian=today.getFullYear();
				var yue=today.getMonth()+1;
				var xingqi=today.getDay()+1;
				var ri=today.getDate();
				var hh=today.getHours();
				var mm=today.getMinutes();
				var ss=today.getSeconds();
				if(hh>12){
					document.getElementById("myclock").innerHTML=nian+"年"+yue+"月"+ri+"日"+"&nbsp;&nbsp"
				+hh+":"+mm+":"+ss+"&nbsp;"+"PM"+"星期"+xingqi;
				}else{
					document.getElementById("myclock").innerHTML=nian+"年"+yue+"月"+ri+"日"+"&nbsp;&nbsp"
				+hh+":"+mm+":"+ss+"&nbsp;"+"AM"+"星期"+xingqi;
				}
				
			}
			disptime();
			var mytime=setInterval("disptime()",1000);
		</script>
	</body>
</html>
